final RequestQueue queue = Volley.newRequestQueue(MainActivity.this);
JsonObjectRequest stringRequest = new JsonObjectRequest(Request.Method.POST, url, params,
        new Response.Listener<JSONObject>() {

            @Override
            public void onResponse(JSONObject response) {
                // Display the first 500 characters of the response string.
                Log.d("test",response.toString());
                text1.setText(response.toString());
            }
        }, new Response.ErrorListener() {
    @Override
    public void onErrorResponse(VolleyError error) {
        Log.d("test","That didn't work!");
    }
}){
    @Override
    public Map<String, String> getHeaders() throws AuthFailureError
    {
        Map<String, String> headers = new HashMap<String, String>();
        headers.put("Content-Type", "application/json");
        headers.put("Cookie", "token=-oVAtAYRwR1RpLsc09UXRVZVrWoAAAAARgwAAGmvPmkHSfkM0KY0leErzrRhIf4ha_mv1Kfh6GQRKh56IMWr-nvUNJwEkOeDpoQjfQ");
        Log.d("head","application/json");
        return headers;
    }
};

queue.add(stringRequest);